from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

dr = webdriver.Chrome(service=Service('chromedriver.exe'))
dr.maximize_window()
dr.get('https://baijiahao.baidu.com/s?id=1825716311916576962&wfr=spider&for=pc')
a1=dr.find_element(By.XPATH, '//*[@id="ssr-content"]/div[2]/div[1]/div[1]/div[3]/div[1]/div[2]/span')
# 获取元素的文本内容
print(a1.text)
# 判断元素是否可见
print(a1.is_displayed())







